<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible"content="IE=8"><!--以IE8模式渲染-->
	<meta http-equiv="X-UA-Compatible"content="IE=7"><!--以IE7模式渲染-->
	<meta http-equiv="X-UA-Compatible"content="IE=9; IE=8; IE=7; IE=EDGE">
	<title>用户操作</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/role_add.css" >
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/jquery_validate/css/validationEngine.jquery.css" >
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/jquery.alert.v1.2/jquery.alert.css"/>
	<script TYPE="text/javascript" src="__PUBLIC__/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery.alert.v1.2/jquery.alert.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery.alert.v1.2/jquery.easydrag.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery.alert.v1.2/jquery.alert.js"></script>
	<script TYPE="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery_validate/js/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/mydate.js"></script>

	<script type="text/javascript">
		function lucklySubmit() 
		{
			if (lucklyNumberValidate() & lucklyTimeValidate()) 
			{
				$("#investForm").submit();
			}
		}

		//	抽奖数字验证
		function lucklyNumberValidate() 
		{
			var value=$("#luckly_number").val();
			var reg = new RegExp("^[0-9]*$");
			if(value==''||value==null) 
			{
				jAlert("抽奖数字不能为空！",'错误提示',null);
				return false;
			}
			else if(!reg.test(value)) 
			{
				jAlert("抽奖数字必须为数字！",'错误提示',null);
				return false;
			}
			else
			{
				return true;
			}
		}

		//	上证股票时间验证
		function lucklyTimeValidate() 
		{
			var value=$("#luckly_time").val();
			if(value==null||value=='') 
			{
				jAlert("时间不能为空！",'错误提示',null);
				return false;
			}
			else
			{
				return true;
			}
		}
	</script>
</head>
<body>
	<div class="contentPage">
		<form action="../../invest/invest/invest_luckly_submit" method="post" id="investForm" enctype="multipart/form-data">
			<input type="hidden" name="invest_id" value="<?php echo $data_array['invest_id']; ?>">
			<input type="hidden" name="count" value="<?php echo $count; ?>">
			<table class="addForm">
				<tr>
					<th><span>*</span>投资标题：</th>
					<td>
						<?php echo $data_array['invest_title']; ?>
						<span id="titleSpan"></span>
					</td>
				</tr>

				<tr>
					<th><span>*</span>总投人数：</th>
					<td>
						<?php echo $data_array['invest_number']; ?>
						<span id="typeSpan"></span>
					</td>
				</tr>

				<tr>
					<th><span>*</span>已投人数：</th>
					<td>
						<?php echo $count; ?>
						<span id="typeSpan"></span>
					</td>
				</tr>

				<tr>
					<th><span>*</span>抽奖数字：</th>
					<td>
						<input type="text" name="luckly_number" id="luckly_number" class="validate[required]">
						<span id="typeSpan"></span>
					</td>
				</tr>

				<tr>
					<th><span>*</span>上证股票时间：</th>
					<td>
						<input type="text" name="luckly_time" id="luckly_time" onfocus="MyCalendar.SetDate(this)">
						<span id="typeSpan"></span>
					</td>
				</tr>

				<tr>
					<td colspan="2" class="addButton">
						<input type="hidden" id="loadNameFlag">
						<input type="button" value="保存" class="save" onclick="lucklySubmit();">
						<input type="reset" value="重置" class="clear">
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>

